import java.util.Scanner;
import java.util.*;
public class MC0326奇怪的数列 {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        // code here
        int n = input.nextInt();
        int k = 1;
        while (n>k){
            n-=k;
            k++;
        }
        System.out.println(k);
        input.close();
    }
}
